package com.shawn.springboot.integeration.common.enums;

import lombok.Getter;

/**
 * @author shawn
 * @description: 常见状态码类型
 * @date 2023/11/26
 */
@Getter
public enum ResponseCode {
    SUCCESS(0, "请求成功"),
    INTERNAL_ERROR(1, "服务器内部错误"),
    USER_INPUT_ERROR(2, "用户输入错误"),
    AUTHENTICATION_NEEDED(3, "Token过期或无效"),
    FORBIDDEN(4, "禁止访问"),
    TOO_FREQUENT_VISIT(5, "访问太频繁，请休息一会儿"),
    INDEX_DUP(6, "主键冲突");
    private final int code;
    private final String message;
    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
